<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%  
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>topic page</title>
	    <link rel="Stylesheet" type="text/css" href="./css/global.css">
		<link rel="Stylesheet" type="text/css" href="./css/list_topic.css">
	</head>
	<body>
		<div class="wrapper">
			<div class="container">
				<div class="header">
					<h3>贴吧首页</h3>
					在线用户：<a href="main.jsp"><s:property value="#session.username"></s:property></a>
					<a href="create_topic.jsp"><span>创建贴子</span></a>
				</div>
				<div style="margin: 15px auto; " >
					<s:form action="TopicAction">
						<s:textfield name="key"></s:textfield>
						<s:submit value="搜索"></s:submit>
					</s:form>
				</div>
				<div class="content">
					<table cellspacing="0">  
        				<tbody class="list topicList">  
	            			<!--显示表头-->  
	            			<tr class="title">  
				                <td width="25">编号</td>  
				                <td width="25">回复</td>  
				                <td width="300">标题</td>  
				                <td width="110">作者</td>  
				                <td width="145">创建时间</td>  
				            </tr>  
    				<s:iterator value="#session.list" >  
            				<!-- 显示部门列表 -->  
				            <tr class="data">  
				                <td class="num"><s:property  value="id" /> </td>  
				                <td class="num"><s:property  value="replySet.size" /></td>  
				                <td><a href="show_topic.jsp"><s:property  value="title" /></a></td> 
				        <!--    <td><s:a href="info.action?id=%{#session.list.id}"> <s:property value="title"/></s:a></td>-->
				                <td class="info"><s:property  value="author" /></td>  
				                <td class="info"><s:date name="createDate" format="yyyy-MM-dd hh:mm:ss" /></td>  
				            </tr>  
				    </s:iterator>  
             
  
					        <tr>  
					            <td colspan="5" class="num">共有贴子数<font color="red"><s:property value="#session.list.size" /> </font>个</td>  
					        </tr>  
					     </tbody>  
					</table>  
				</div>
			</div>
		</div>
	</body>
</html>